<%@ page
	import="com.google.appengine.api.users.User,com.google.appengine.api.users.UserService,com.google.appengine.api.users.UserServiceFactory"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Celestica Ops Central -- Error Page</title>
</head>
<body>


	<h1><%=request.getParameter("error_msg")%></h1>

	<h2>

		<%
			UserService userService = UserServiceFactory.getUserService();
			User user = userService.getCurrentUser();
			if (user != null) {
				String strURL = request.getRequestURI();
				strURL = strURL.replace("logout.jsp", "home.jsp");
		%>

		<p>
			Hello,
			<%=user.getNickname()%>! (Please use the right email ID to access
			this application <a href="<%=userService.createLogoutURL(strURL)%>">sign
				out</a>.)
		</p>

		<%
			} else {
				//response.sendRedirect("home.jsp");
		%>
		<p>
			Hello! <a
				href="<%=userService.createLoginURL(request.getRequestURI())%>">Sign
				in</a> to access this application.
		</p>
		<%
			}
		%>
	</h2>
</body>
</html>